import type { App } from "vue";
import { useUserInfoStore } from "@/stores/userInfo";
import { defaultMaxListeners } from "events";
const userInfo = useUserInfoStore()
function hasBtnPermission(app: App) {
    app.directive('has', (el, bindings) => {
        // console.log(el, bindings)
        if (!userInfo.buttons.includes(bindings.value)) {
            el.parentNode.removeChild(el)
        }

    })
}

export default hasBtnPermission